home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 63142 / 63142.xpi / older / tkp35.xpi / chrome / content / overlay.js < prev    next >
Text File  |  2010-01-24  |  2KB  |  41 lines

  1. var ketkpin = {
  2.   onLoad: function() {
  3.     // initialization code
  4.     this.initialized = true;
  5.     this.strings = document.getElementById("ketkpin-strings");
  6.   },
  7.  
  8.   onMenuItemCommand: function(e) {
  9.       var my_url=window.content.location.href;
  10.       //alert(my_url);
  11.       window.content.location.href="http://ketkp.in/index-exp.php?url="+escape(my_url);
  12.      // window.location="http://ketkp.in/index-exp.php?url="+escape(myurl);
  13.   },
  14.  onMenuItemCommand2: function(e) {
  15.       var my_url=window.content.location.href;
  16.       var my_custom=prompt("Masukkan Nama TKP yang di inginkan (contoh: url_imut69)");
  17.       //alert(my_custom);
  18.       window.content.location.href="http://ketkp.in/index-exp.php?url="+escape(my_url)+"&custom_name="+escape(my_custom);
  19.      // window.location="http://ketkp.in/index-exp.php?url="+escape(myurl);
  20.   },
  21.   onMenuItemCommand3: function(e) {
  22.       var my_url=gContextMenu.getLinkURL();
  23.       window.content.location.href="http://ketkp.in/index-exp.php?url="+escape(my_url);
  24.   },
  25.  
  26.   onMenuItemCommand4: function(e) {
  27.       var my_url=gContextMenu.getLinkURL();
  28.       var my_custom=prompt("Masukkan Nama TKP yang di inginkan (contoh: url_imut69)");
  29.       //alert(my_custom);
  30.       window.content.location.href="http://ketkp.in/index-exp.php?url="+escape(my_url)+"&custom_name="+escape(my_custom);
  31.      // window.location="http://ketkp.in/index-exp.php?url="+escape(myurl);
  32.   },
  33.  
  34.   onToolbarButtonCommand: function(e) {
  35.     // just reuse the function above.  you can change this, obviously!
  36.     ketkpin.onMenuItemCommand(e);
  37.   }
  38. };
  39.  
  40. window.addEventListener("load", ketkpin.onLoad, false);
  41.